package com.ymk.cmd;

import com.ymk.base.cmd.ACmd;
import com.ymk.base.cmd.CmdSign;
import com.ymk.bo.pay.PayDivideBO;
import com.ymk.core.code.cmd.PayPaymentCmdCode;
import com.ymk.service.IPayDivideService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.servlet.http.HttpServletRequest;

@Service
public class PayDividePostCmd extends ACmd {

    @Override
    public CmdSign executeMop(HttpServletRequest request, CmdSign sign) throws Exception {
        CmdSign respSign = new CmdSign(sign);
        PayDivideBO reqData = super.getData(sign, PayDivideBO.class);

        this.PayDivideService.post(reqData);

        return respSign;
    }

    @Override
    public String getCmdCode() {
        return PayPaymentCmdCode.PAY_DIVIDE_POST;
    }

    @Autowired
    private IPayDivideService PayDivideService;
}